Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@aduth/is-dependency
Advanced tools
Quickly determine if the given package(s) are dependencies in the current directory
@aduth/is-dependency
A utility to quickly determine if the given package(s) are dependencies within the current working directory.
This implementation optimizes speed over accuracy, synchronously returning true if the package is defined as a dependency in the current directory's package.json
, regardless of whether it's actually installed.
Install using npm:
npm install @aduth/is-dependency
Pass a name or array of names of dependencies and receive a boolean value in return.
import { isDependency } from '@aduth/is-dependency';
isDependency('@aduth/is-dependency');
// true
isDependency
Returns true if the given package name or array of names are all defined as dependency's in the current working directory's relative package.json
.
Optionally, pass an object of options to control the behavior.
export type Options = {
/**
* Fields to check in `package.json`.
*/
fields: string[];
};
export function isDependency(
nameOrNames: string | string[],
options?: Partial<Options> | undefined
): boolean;
Copyright 2021 Andrew Duthie
Released under the MIT License.
FAQs
Quickly determine if the given package(s) are dependencies in the current directory
We found that @aduth/is-dependency demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.